package com.scpii.universal.hibernate.entity;

import java.lang.Integer;

import com.scpii.universal.util.Const;
import com.scpii.universal.util.DateAndString;

/**
 * CatelogTab entity. @author MyEclipse Persistence Tools
 */

public class CatelogTab implements java.io.Serializable {

	// Fields

	private static final long serialVersionUID = 1924257441422811341L;
	private Integer intCateId;
	private String varCateName;
	private Integer intEnterpId;
	private Integer intParentCateId;
	private Integer intAppId;
	private String varCateImgUrl;
	private Integer intDeleteSign;
	private String datUpdateDatetime;
	private String varCateDescrip;
	private Integer intType;
	private Integer intPrivilege;
	public static final int PUBLIC_PRIVILEGE = 0;
	public static final int CUSTOMER_PRIVILEGE = 1;
	public static final int PERSON_PRIVILEGE = 2;

	/** default constructor */
	public CatelogTab() {
	}

	public CatelogTab(Integer intCateId) {
		super();
		this.intCateId = intCateId;
	}

	public Integer getIntCateId() {
		return this.intCateId;
	}

	public void setIntCateId(Integer intCateId) {
		this.intCateId = intCateId;
	}

	public String getVarCateName() {
		return DateAndString.nullControl(this.varCateName);
	}

	public void setVarCateName(String varCateName) {
		this.varCateName = varCateName;
	}

	public Integer getIntEnterpId() {
		return this.intEnterpId;
	}

	public void setIntEnterpId(Integer intEnterpId) {
		this.intEnterpId = intEnterpId;
	}

	public Integer getIntParentCateId() {
		return this.intParentCateId;
	}

	public void setIntParentCateId(Integer intParentCateId) {
		this.intParentCateId = intParentCateId;
	}

	public Integer getIntAppId() {
		return this.intAppId;
	}

	public void setIntAppId(Integer intAppId) {
		this.intAppId = intAppId;
	}

	public String getVarCateImgUrl() {
		if (varCateImgUrl!=null && varCateImgUrl.trim().length()>0) {
			if (!varCateImgUrl.contains(Const.IMG_RELATIVE_PREFIX)) {
				return varCateImgUrl;
			}else {
				return Const.HOST_SRC_IMG_PATH + DateAndString.nullControl(this.varCateImgUrl);
			}
		}else {
			return "";
		}
	}

	public void setVarCateImgUrl(String varCateImgUrl) {
		this.varCateImgUrl = varCateImgUrl;
	}

	public Integer getIntDeleteSign() {
		return this.intDeleteSign;
	}

	public void setIntDeleteSign(Integer intDeleteSign) {
		this.intDeleteSign = intDeleteSign;
	}

	public String getDatUpdateDatetime() {
		return DateAndString.nullControl(this.datUpdateDatetime);
	}

	public void setDatUpdateDatetime(String datUpdateDatetime) {
		this.datUpdateDatetime = datUpdateDatetime;
	}

	public String getVarCateDescrip() {
		return DateAndString.nullControl(varCateDescrip);
	}

	public void setVarCateDescrip(String varCateDescrip) {
		this.varCateDescrip = varCateDescrip;
	}

	public Integer getIntType() {
		return intType;
	}

	public void setIntType(Integer intType) {
		this.intType = intType;
	}

	public Integer getIntPrivilege() {
		if (intPrivilege == null)
			return PUBLIC_PRIVILEGE;
		return intPrivilege;
	}

	public void setIntPrivilege(Integer intPrivilege) {
		this.intPrivilege = intPrivilege;
	}
}